package com.webbei.product.service.impl;

import java.util.List;
import java.util.Map;

import com.webbei.pojo.Advertisement;
import com.webbei.pojo.Customs;
import com.webbei.pojo.DengLu;
import com.webbei.pojo.Designers;
import com.webbei.product.action.OtherProduct;
import com.webbei.product.action.Product;
import com.webbei.product.action.ProductInfo;
import com.webbei.product.dao.ProductDao;
import com.webbei.product.service.ProductService;

public class ProductServiceImpl implements ProductService{
  private ProductDao pd;
  
	public ProductDao getPd() {
		return pd;
	}
	
	public void setPd(ProductDao pd) {
		this.pd = pd;
	}

	@Override
	public List<Product> getProducts() {
      List<Product>products = pd.getProducts();
		return products;
	}

	@Override
	public ProductInfo getProductById(int id) {
		
		return pd.getProductById(id);
	}

	@Override
	public List<OtherProduct> checkOtherProducts(String mark) {
		return pd.getOtherProducts(mark);
	}

	@Override
	public List<Advertisement> getAllAdvertisements() {
		//
		return pd.getAllAdvertisements();
	}

	@Override
	public List<Customs> getCustomsByBgPic(int productId) {
		
		return pd.getCustomByBgPic(productId);
	}

	@Override
	public Designers getDesignerByUsername(String username) {
		
		return pd.getDesignerByUsername(username);
	}

	@Override
	public List<String> getBgPicByUrl(String url) {
		
		return pd.getBgPicByUrl(url);
	}

	@Override
	public String getTypesPicByName(String seriesName) {
		// TODO Auto-generated method stub
		return pd.getTypesPicByName(seriesName);
	}

	@Override
	public Map<String, String> getDengLuKey(String name) {
		// TODO Auto-generated method stub
		return pd.getDengLuKey(name);
	}

	@Override
	public DengLu getDengLuByName(String name) {
		// TODO Auto-generated method stub
		return pd.getDengLuByName(name);
	}

}
